package com.wuye.letter.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.wuye.basic.domain.WyOwner;
import com.wuye.charge.domain.WyCostMake;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.wuye.common.annotation.Excel;
import com.wuye.common.core.domain.BaseEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 短信记录对象 wy_letter
 * 
 * @author avalon
 * @date 2024-11-27
 */
@Data
public class WyLetter extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    @Excel(name = "主键")
    @TableId(value = "letter_id",type = IdType.AUTO)
    private Long letterId;

    /** 发送人 */
    @Excel(name = "发送人")
    private String userName;

    /** 发送内容 */
    @Excel(name = "发送内容")
    private String letterInfo;
    @TableField(exist = false)
    private Long[] ownerList;

    /** 业主 */
    private Long ownerId;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 逻辑删除 0 不删除 1删除 */
    @TableLogic
    private Long del;
    /** 业主 */
    @TableField(exist = false)
    private WyOwner owner;



    public void setLetterId(Long letterId) 
    {
        this.letterId = letterId;
    }

    public Long getLetterId() 
    {
        return letterId;
    }
    public void setUserName(String userName) 
    {
        this.userName = userName;
    }

    public String getUserName() 
    {
        return userName;
    }
    public void setLetterInfo(String letterInfo) 
    {
        this.letterInfo = letterInfo;
    }

    public String getLetterInfo() 
    {
        return letterInfo;
    }
    public void setOwnerId(Long ownerId) 
    {
        this.ownerId = ownerId;
    }

    public Long getOwnerId() 
    {
        return ownerId;
    }
    public void setDel(Long del) 
    {
        this.del = del;
    }

    public Long getDel() 
    {
        return del;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("letterId", getLetterId())
            .append("userName", getUserName())
            .append("letterInfo", getLetterInfo())
            .append("ownerId", getOwnerId())
            .append("createTime", getCreateTime())
            .append("del", getDel())
            .toString();
    }
}
